﻿@{
    Layout = "_LayoutPhone";
}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<header style="width: 100%; height: 4rem; background-color: rgb(255,135,0);top:0px;position: fixed;z-index: 1;">
    <a href="../PhoneShouYe/ShouYe" id="a">
        <img src="~/GoTRI/img/left.png" alt="" style="float: left;
            width: 1rem;
            height: 2rem;
            margin-left: 1rem;
            margin-top: 1rem;
            position:absolute;
	        left:0px;
	        top:0px;
	        z-index:1;">
    </a>
    <div style=" width: 100%; height: 4rem; line-height: 4rem; text-align: center; color: #fff; font-size: 1.3rem;">新闻详细</div>
</header>
<div style="width:1px;padding-bottom:50px"></div>
<script>
    $(".yi").attr("hidden", "");
</script>
<div class="wrapper">
    <div class="container mt-4 main-container">
        <div class="row">
            <div class="col-12 col-md-6">
                <div class="card mb-4">
                    <div class="card-body">
                        <h5><center id="BiaoTi"></center></h5>
                        <span id="ShiJian" style="font-size: 10px;color:gray;"></span><span style="float:right;font-size: 10px;color:gray;" id="FaBuRen"></span><br /><br />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="NeiRong"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div style="margin-bottom: 50px;padding-bottom:1px"></div>
<script>
    $(document).ready(function () {
        xingwenzhanshi();

        if (GetQueryString("panduan") == "shouye") {
            $('#a').removeAttr("href");
            $('#a').attr('href', "ShouYe");
        } else if (GetQueryString("panduan") == "xinwen") {
            $('#a').removeAttr("href");
            $('#a').attr('href', "XinWenList");
        }
    })

    function xingwenzhanshi() {
        var id = GetQueryString("id");
        $.ajax({
            type: 'post',
            url: '../XinWen/XinWenXiangXi',
            data: { "id": id },
            async: false,
            dataType: 'json',
            success: function (date) {
                var json = date;
                $.each(json, function (index) {
                    $("#BiaoTi").text(json[index].BiaoTi);
                    $("#ShiJian").text("发布时间:" + json[index].ShiJian);
                    $("#FaBuRen").text("发布人:" + json[index].FaBuRen);
                    $("#NeiRong").text(json[index].NeiRong);
                })
            },
        })
    }
    //获取数据方法
    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;
    }
</script>
